The SixBit Application Programming Interface > Examples > Drop Folder Example |
With Drop Folder Automation, API calls can be made simply by placing the calls in a file in XML format and dropping the files into a specific folder. The following example demonstrates this process. This example consists of 4 files. These files can be found in the SixBit installed directory under SixBit API SDK\Examples\Drop Folder.
Sample Files
There are 4 files that perform the following actions.
File Name | Actions Performed |
FileA.xml | This file uses the Items_AddUpdate call to create an item that includes item specifics, an initial purchase of 5 items and the supplier information. It then uses the Inventory_Reconcile call to reconcile the inventory to 10. Finally a Suppliers_AddUpdate is used to fix the spelling of the suppliers last name and add a web address on the supplier record. |
FileB.xml | (Note: This is only for users of the Consignment Module) This file uses the Suppliers_AddUpdate call to set the supplier created in FileA.xml as a Consignor and then sets a default ConsignmentPlan to 50/50 Split. It then performs an Items_AddUpdate to update the item created in FileA.xml to be a consigned item for the newly created consignor with a consignment plan of Straight 35%. |
FileC.xml | This file uses the Orders_Add call to create an order for the item that includes the buyer, shipment, sale and address information. It then calls Buyers_AddUpdate to add a Sales Tax ID for the buyer. |
FileD.xml | This file uses the Sales_Update call to update the quantity sold to 2 on the sale for the order created in FileC.xml. It then uses the Shipments_Update call to update the shipping service to USPS Priority Mail and sets a tracking number on the shipment. |
Running the Sample
These files can be used to see the Drop Folder Automation in action. We recommend that you make a backup of your database before running this example, then restore the backup when finished.
The sample can be run right from within SixBit, or by using the SixBit API Sample Application. By running from within SixBit you can test the complete process, include the drop folder location, but you will need to wait on the Agent to perform the actions. Using the Sample Application, you can make the actions run immediately.
To run the sample from within SixBit:
To run the sample from the Sample Application: